Bug fixes, and ensureIndex notes