fixes the problem that cannot get snapshot.