minor improvements
fixes #1708, fixes #871