Fixed the path bug for right click menu