Small fixes for logging