Fixed the FOREIGN KEY/UNIQUE bug.