Couple of debugging fixes