fix save in js