changes for compatibility with new pandas release 0.13