Small fixes in lead.js