@Heru, is the project you submitted created on a version of kicad prior to 4.0.0? There was a bug in 5.0.0 (as well as nightly builds from 7/6/2016) that could have caused this issue but it only would happen under certain conditions when a version 2 or earlier schematic was opened. The problem is once you've opened a schematic under these conditions and saved the file using one of the broken versions of KiCad, it's too late as the bug happens when reading the file. This bug was fixed and release in 5.0.1. I'm not sure this was the problem but I suspect it is why I cannot duplicate it.
@Heru, is the project you submitted created on a version of kicad prior to 4.0.0? There was a bug in 5.0.0 (as well as nightly builds from 7/6/2016) that could have caused this issue but it only would happen under certain conditions when a version 2 or earlier schematic was opened. The problem is once you've opened a schematic under these conditions and saved the file using one of the broken versions of KiCad, it's too late as the bug happens when reading the file. This bug was fixed and release in 5.0.1. I'm not sure this was the problem but I suspect it is why I cannot duplicate it.