Removed error in calculating hash.