Updated hook handler.