BUG: fix maxsize code on python2.5.