Fixed a NPE in UIImage