More misc bugfixes to client