Added in a little error handling so the server does not crash