1) Fixed a bug in backtracking