Fix osc_run_hook('pre_user_post') called when error