Fix bug
fix tests
fix py3 and multiindex