fixed greedy deletion in b34dfdcfc86ee55c1812e6e828933f48caed746d