fixed js exception