Fix switch_program_to()

I was not able to get the `switch_program_to()` method to work without this minor fix.