Take picture while rotation crash fixed