Added code changes to alleviate crash

Signed-off-by: Darren Ehlers <me@darrenehlers.com>
Merge pull request #1 from gatewaytechnology/dme/fix-crash-workaround

Added code changes to alleviate crash