Fixed correct searching in dict.
Fixed errors upon connecting to server.