Fixed bug in consumer