fix compiler warnings
fix style