Fixed missing variable checks

Signed-off-by: jdarwood007 <github+smf@sleepycode.com>
Merge pull request #744 from jdarwood007/fixes-0dc6202

Fixed missing variable checks