add @end hook; behaves differently on @fork(yes/no)