Fixes a bug where the DB reader would only read one row.