fixed small bug about whitespace input