Solved bug in orientation