fix race condition that made the script run bananas
Merge branch 'byte' of github.com:ByteInternet/nagios-api into byte