bug fix and comments
(#388)