Various small issues, closes #1229, #1231 and #1235