Fix CastException when switching between surface and multi2d mode in
dexplore