fixed some server_helper functions, but it seems not all work in all contexts.