fixed mappedin.js to only pass lang if it is defined