Fixes and improved hooks