Fixed the corrupted hash bug and removed debug statements