fixed a race in comparison