fixed error in flushPolys()/renderPolys()