Removed double if statement