Some bug fix; creating context menu