Fixed bug in set_program where outcomes were not being iterated over properly