switched the order of the when and do_return commands