changed the index
fix a little a bug about encoding