Fix error spans from breaking layout