Fixed the listed dates remaining after pressing enter. Fixed program closing too soon after showing date in case of a non-empty input buffer.