fix JS direct select problem