fix wrong foreign_key order at add method