Fix some issues

Hi, 

Here is a pull request, fixing a bug when your host has only one service (on the same line). Current code is running well, but it's only tested on one Nagios 3 instance.