prevent segfaults