fixed directiontext bug