fixes to removeRecord