some fixes for building;