UI fixed, foreign keys fix