fixing errors with line methods being called for strings