misc fixes to caching and order state lifecycle