Preventing possible segfault