fix errors because of -pedantic