Fixing overcounting issue (issue #97)