Fixes based on feedback in the pull request