fix bug with layers control after trajectory reload