fixed parsing exception handling