make parsing more fault tolerant