fixed a bug when switching from mobile to desktop modal views