environindex is removed in lua502