fix error on complex direction, some ui fixes