fix powerswitcher test code;