Fixed checkConflicts() function