fix error when take the first photo, thanks to marcel :sweat: