Enhance makefile
Fix bug