fixed parsing and line boundaries