Added code changes to alleviate crash

Signed-off-by: Darren Ehlers <me@darrenehlers.com>