Merge pull request #146 from efcs/fix-iteration-type

Fix issue #141. Use size_t instead of int for the iteration count