Fixing bugs in makefile