fix bug in QBC
fix bug in QBC