Fix for creating 2dsphere indexes and added tests