fixed subset bug in select method