Yet more little fixes found in debugging
Merge pull request #25 from jaypipes/working

Yet more little fixes found in debugging