fix issue in console producer and consumer