fix for selection bug