Added invert
Minor fix to invert