A small fix for reindexing environments