Fixed bugs with decoding 9-patch images