Fixed bug in QSDindexed_contract