Made the Makefile more robust