added foreign_bind_clear/apply