Fixed Carter's LC generation code.