frame count (out of memory fix)