Revert "Some problems in build-assets"

The problem was actually with context manager.
This reverts commit 996c3fae601b6a5348ade0004b663515cb73f20d.