fixed some errors on index
fixed js linking bug