fix for issue with not existing record in DB