WIP: fix some compilation errors