WIP: fix some compiler issues