Bug fixes
Merge branch 'issue-1309' into valgrind