Fixed serious bug in TargetLogic