restart server properly