Fixed bugs contained in the comments