Fixed the issue of allowing an empty input