getOrElse in wrong place