Bug fix with comments