loop fix to qua