fix foreign key
fix tests
fix active admin