debugging for sam, and an old fix forgotten
11 files changed