Some more fixing and debugging.