fix 3d mode switch on/off issue

this fixed #1564