fixed bugs in the makefile