bugfixes and Makefile using mac config added