fixes for source builds