fixed getUnit problem