fixing compilation and style