Revert "Change if to switch and force use of quality option"

This reverts commit 139c4904ed220ee829c9d7d1eeb449af10a5798d.