Dont set units twice. Remove duplicated code