fix take photo bug