Fix bug in consumer when update offset