Fix for loading BitmapData from bytes, and minor fixes