clear db, fix error parsing