Fixed invert test and Makefile for tests