fix parsing for multiple lines