Fixed null pointer exception from last week
prior to implementing segments