fixing compilation
WIP (stuff might not be working)