Fixed some bugs in flex sensu plugins