bug fixes to makefile