Fix some weird Makefile bugs