Fixed edgecase for inequality issue
Refactor to some kind of pattern that has no name AFAIK