Fix bug that server restarts every time using