backport @tdurand fix into ui/src