moved cleanup_assets before precompile to prevent clobbering assets