minor bug fix and code comments
Added a comment