Fixed bug if no records found