FIx parsing of qual matches. Fixes #497