few more hat-related fixes