Fix bug overwriting current quality with initial value.