Fixing glitch with multiple dimensions