Fix inconsistencies

I think the patch is okay. Now. I am reloading the databae again and will run the update-job afterwards and check again. Going to eat, expect a report in an hour or two.