fixed several bugs with units
fixed bug with shapes positions