Merge pull request #287 from patricksnape/master

Fixed duplication bug