fixed reduction bug