Invert: fix crash