Fixed bug where parent was getting value instead of null
Replaced when.all/map by just when.map