Try to fix a bug while switch pirtures.