ticket:6 js correction