Fixed ROB bug that cause infinite loops