fixed some bugs in select2