Changed code within pw_profileswitch