fix really old crappy code that apparently doesn't work anymore