Fixed a major null reference bug.  I am not sure how the heck this one slipped through undetected.