Fix for is_teaching() error