Remove overcomplicated (and wrong) logic