Adapt to the latest Kotlin changes