fixed bug foreign_key in client_app