Fixed crash when mouse right-click on non-primitive elements (#85)