Some little optimisation.
(cherry picked from commit df2742de1767c0ded3cf37dd88d094c7d59bc882)