Fixed the bug in family creation