fixed two uninitialised memory bugs
Merge pull request #1295 from karlnapf/develop

fixed two uninitialised memory bugs