Handle client state a bit more sanely