bug fix for select.rs