bug fixes for end weights, which makes negligible difference in results that I've seen so far