fix makefile bugs