some fixes for multi-goal