Closes issue #1593 - namespace error
Closes issue #1595 - sorting on a list of tuples can sometimes cause crashes
Merge pull request #1618 from WeatherGod/mplot3d/crashfixes

Mplot3d/crashfixes