Fixed a bug in the initWithImage:orientation: method.