Fixed rowcount check

Messed up the previous time I gave it a go, this one’s better :)