avoid unnecessary reverse extension, and fix index