bugfixes with lastwriterwinning