Wow that was crappy coding.