Hook system bugfixes