added a fault tolerant option; js generate now uses the option in some places