Fixed Scala to Java conversion in models