Fixed bugs with Makefiles