Added check to make sure there are no double entries