Kotlin compatibility fix