fix build error
fix a bunch of warnings