Fixed creation of new records