fixes to riv-build

riv build works