add changes that were made in #319
Merge pull request #320 from sambaek/master

add changes that were made in #319