fix take screentshot issue.