Fixed mistakes addressed by Shamoon's comments