Fix compatibility for previous fix for py2