Fixed failed tests.

Removed $publish paramters. The behavior depends on the environment when $publish=1.