fix no records bug