handling recordnotfound correctly