Added check to remove any hash collisions

Also fixed a bug in the Helper class