Fix tests
(cherry picked from commit 2ea9284)