Fixed variance issue in Scala 2.11