Several minor fixes

Closes #1132