added an early rowcount to avoid some error (crapy fix temp)