Refined process but flatten still not working correctly