DISTRIBUTION build flag fixes