fixed formatTargetClose bug