fixed compatibility to py26