Added error checking.

Fixed issues of calling Client Page when a client isn't highlighted.
Also changed selectedClientId when no clients are selected.