Fixed compiler warnings and corrected my previous commit, was reading the output wrong.