fix bug in indirectSelect