Quick fix with logging