Got rid of some nagging edge cases in the server