minor bugfixes and updated buildScript