add goto to fix break bug