Fixing various errors.