bugfix for ace and python3 compatibility when reading less than all the data.
Merge pull request #626 from scopatz/ace

bugfix for ace and python3 compatibility when reading less than all the data