Fix hook script