Replace uses of unsafe
with safe alternatives
#1714
Merged
unsafe
with safe alternatives
#1714