Nonfactorizable effects in top quark production