WiP: fix some issues