fixed makefile bugs