fixed backtracking