some fixes (PLL reg calc, switch handling & reset)