More fixes, almost working it seems.