code optimization, multi view fix