various build/warning fixes