Add apply after emit to fix hostname picker test