Fix for various selection issues