Fixing android canvas bug