Further fix issue #16 - found another place where values needed to be checked before using.