fixed js adding element code and localized