fixed some issues on server.