Fixed photo capture crash and save issue

Capturing photos works without crashing and is saved in the internal
memory