tweak build process, close #528