Fixes for logging