Fixed duplicate entries being created when updating data.