Merge pull request #399 from muggenhor/warning-fixes