Fix problems with newer gcc versions and typo

Here you go. Split up the changes into two commits.