added some parsing fixes