fixing select problem