bugfixes for makefile