Fixed tests that were failing only when run in phantom.