Fix bug with history not being created on edit of objects