Fix bug with single records