r151: fixed a segfault caused by qual