minor: build changes and bug fixes