correct logic for commit ec8bc207ae