Some fixes for the asset optimization