fixes on server, cleanup