fixed some 2.6 library incompatabilities

Fixed some convenience usages of 2.7 library features.