Fixes for blitbuffer implementation