fixed nullpointer exception when no picture is taken