Minor fix to makefile

Also fixed unintended code change