JS path bug fixed