Initial work on fixing sdeb (previously not working at all)