Fixed some code that was messed up.