Fixed resizing and context menu issues