Fixes stub/expect misusage.