Fixed the bug that made frontier search identify incorrect frontiers