Fixed multi-threaded bug in test consumer