Fixed segfault due to -std=c99