Modifications to support Python 3.4