Small stuff found while debugging.
Small debug fixes and changes.