Added Jasmine test for bug fix. Updated comments.