It looks like you're modifying more than 'invertImages' in this pull request. Is that intentional?