[[ Bug 11917 ]] Make sure all variables are initilaised.
Merge branch 'bugfix-11917' into develop