Fixed bugs in multi-layer code related to changing params