fixed parsing rules