fixed another error when no records were returned