Fixed duplicate data issue

Second try first try broke the save function