Fixed compile errors on mac.
Removed warnings - comparison of unsigned expression < 0 is always false.