small enhancements & bugfix in hook