fix row count problem