Fixing client log out crash