1. fixes js and lua template.