minor error fixed in js