fixed usage of hook