some fixes for building