minor bugfixes and makefile update