flow: handle struct initialization better