fixing some build bugs