Added sanity conditions to server