code cleanup

Follow-up to #5813.