Fixed bugs in adaptationset switching