Bug and typo fixed