Fix some varables that were causing an error