fix problems on parsing