fixed issue with only logging first word