improving tests to make them run under phantom