Added hardware test and fixed concurrent modification error.