Removed unnecessary if statement in createLocators method.