Fix #185 and #186

This corrects some small bugs and omissions.