fixed reducer bug