Attempt to fix errors related to hooks