fix some issues with compile flags