Fixed issues from pull request