safe: implement loading on slices and fix some bugs