Made if statement more specific