Fixed code to compensate for FILTER_VALIDATE_BOOLEAN bug