fixes for compilation - WIP