fix take picture bug