fixed an issue where inserting an object sometimes wouldnt take.