Merged fixes to makefile