Fix issues with python 2.6 and deleted labels.