recove js and fix index