fix segfault when multiple goals are passed to move_group