fixed server restart to work in production