improved Makefile
fixed bug