Corrected syntax for object hooks