fixed issues as discussed in pull request