fixes create_client_model middleware