fixed previous input discarding