bug fix in selector code.