Fixed bug that would cause the server to get trapped in a loop