Fix a bunch of type mismatch-related warnings (Jan Kiszka). Fix a typo in my previous comming (spotted by Laurent Desnouges).
Changed paths: