image not saving properly. image instance is nil