Added checks of the server. Fixed #16.