This is more or less copied from the old version. Certainly, we can think about how to handle that things better.