bugfixes in makefiles