fix build error and clean up