fixed an issue that would cause a crash upon right-clicking a mesh element