Several bugfixes mostly related to dragging