change $row to $r

My IDE complained about "undefined variable $rows" so I changed it to $r.
Merge pull request #25 from bronsen/master

change "undefined variable" to a defined one in package controller