fix errors when starting server