Ignore empty input in history