Fixed resizing and selection issues