bugfix in hook