adding check for missing elements in binding causing null ref