fix some warnings
fix test errors