wip fix several issues