A couple of fixes, still WIP