Hopefully fixing a horrible piece of code that should never have happened.