Fixed some hooks and indentation