patch to &prev GL problem

using size_t instead of int