fixed bug in selector creation