fix build and style problems