bug fixes in COnsumer and Producer