Fixed freezing glitch