fixing refresh screenshot bug