Fixed a bug with quest victory checks.