Added corect id of foreign keys from strings