Fixed readBMP