Fixed error in units controller