Fix GUI crash on empty input