Fixed small bug of printing a end line is result is empty