fixed NoSQL bug that meant data was being deleted on update