Fixed bug with return states for Quality sensor