fix a small bug by using 'trim'