added some error catching so the bo doesn't crash