Fix merge of next and ql-refactor