fix parallel bug found by karteek kumar