fixed a problem with composite foreign keys when searching for uniqueness of the slug