fix index space issue