bugfix: allocated a duplicated currentView/layer