bug in direction fixed