Call callbacks safely in the server