Reintroduce fix that got lost on last commit