FIX a couple bugs in makefile