[[ Bugfix 11191 ]] Memory corruption

Fixed an incorrect type being used but doesn't seem to eliminate the crash.