Fix JS error found by @yuhunglin