Same bugfix as previous commit, simpler way to do it.