getNumBytes() added
condition for previous frame backup added
minor native code optimizations