fixups and debugging