fix potential JS error