Fixes issue with unqiue constraint