some fixes for popcorn-build