backtracking fixes