changed compiler optimization (-O3 causes segfault)