Fixing issue if no record found