Removed check for duplicate name, that was throwing null exception