Fixed makefile bugs