fixed a bunch of build errors