Dataset creation fix and Python 2.6 fix