fix issue #169 (show segfaults)