It turns out the order of the method invocation matters.