Fixed potential issue with quality option