Changes based on comments of cheeaun on pull request #31