Fix error when retrieving previous non-existant values for new record