Fixed exception when player leaves

Fixed bug where an exception is thrown when a player leaves with the
Sonar on.