fix switch view issue

Signed-off-by: Jianmin Zhou <toandrew@infthink.com>