Modify to work better with rustpkg