Fixed the unique hash constraint