fix bugs makefiles