Remove unnecessary invert function