Changes for compatibility with 6L02

These changes are not trivial, and someone else might want to take a
look at them!