fixed some ppc bugs in direction detection, hope now its better