Merge pull request #1058 from jmaas/master

Multiple fixes