Fixed some non-local glitches