fix some parsing issues