fix according to comments in pull request