Bugfixing write coallation logic