Fix barf on empty input