added build and other fixes