fixed selection bug