Fixed module imports

(cherry picked from commit a099b5474e5b2dd2d12565b0deb84022a2abf70a)
Module replace rule