Cleanup old code path and buggy behavior in the hook related methods