fixing issues as requested in the pull request