some fixes for compilation