WIP: fix compile errors