Refactor #3940: Some small changes