fix issue for hemlock_rest server, needs to be tested