Add more sanity checks

And fix a bwspread bug.