Is there particular reason why you using ReAPI?
You can hook Reload and Deploy with Ham and you using both entity_set_int (engine) and set_member (reapi) while both doing the same thing
P/S: This one I am not sure but is it necessary to unregister_forward?