Fixed PR bugs