fixes based on another couple of suggestion in the PR discussion