Fixed some vary bad mistakes.