Fixed bug by making creating model instances wait for the server to respond with the instance ID