fix malformed if statement