fix for hasModifier function.