Move build_dialect method back