Fixed an unintended modifications to the refining method