r147: fixed a segfault