Fixed merge issue so the code corresponds to SD master branch.