fix some bugs on saving images and selecting cameras