Small debugging fixes