Some fixes in unit system