Fix several compilation warnings