changed order of params in private method
(cherry picked from commit 7090ccc)