fix bug on unit