Observed FeO/MgO ratios in the Moon and Earth are inconsistent with simulations done with a single homogeneous silicate layer. In this paper we use a newly developed equation of state to perform smoothed particle hydrodynamics simulations on the lunar-forming impact, testing the effect of a primordial magma ocean on Earth. This is investigated using the impact parameters of both the canonical case, in which a Mars-sized impactor hits a non-rotating Earth at an oblate angle, and the fast-rotating case, in which a half-sized Mars impactor hits a fast-spinning Earth head-on. We find that the inclusion of a magma ocean results in a less massive Moon and leads to slightly more mixing. Additionally, we test how an icy Theia would affect the results and find that this reduces the probability of a successful Moon formation. Simulations of the fast-spinning case are found to be unable to form a massive-enough Moon.