fixed: make sure to remap references on valid elements

comments or description might be empty
Merge pull request #3 from yarinb/master

Minor fix when remapping references on invalid elements