Fixing some improper classes being used on the wrong variables.