fixed bug for select definition