Fixed some errors made while adding right-click menu