updated correction for errors, also fixes #9