Two changes

see commit messages for details
@zseder