Fixed some issues with a null pointer exception

Signed-off-by: jwesley <jwesley@L74E00-R9WFCT6.prod.travp.net>