fix bug introduced when experimenting with logging