an unsual bug cause segment fault for which I don't why