Fixed hook error reporting.