fixed js for production to deal with webhook issue