UPD: some changes regarding the hendling of the context menu