Improve build action_hook