Various fixes for publish and app loading