updated makefiles fixed some bugs in stests