fix some bugs with the transform tool. Should have better mouse action