Conflict detection and resolution