Fix compilation.
Parse hooks more completely.