To what extent does a master's GPA outweigh my undergrad GPA?

Background: I got either rejected by all the schools that I applied to or haven't heard about funding from those schools that accepted me However, I got into a 2 year master's program at a pretty good school (with funding, surprisingly); so this is going to be my only option pretty much. But now I am worried if PhD schools will still reject me even after doing master's, based on my undergraduate credentials.

I know exactly what the problem was with my application: I switched to math major last minute. This is what happens when you do that:

1. I lacked a number of core courses in pure math because I switched to math last minute (I did have 2 analysis courses, linear and abstract algebra, and lots of courses like diff-eq. I still lacked courses in combinatorics, geometry, topology, number theory, though)

2. My GRE Subject score was kind of bad because I didn't have to time to prepare for it after switching my major to math last minute

3. My undergrad research topic wasn't really in mathematics because I switched my major last minute

4. I did not get to know my math professors very well because I switched my major last minute

5. My math GPA was not great because I did not plan to major in mathematics, let alone going to graduate school in mathematics; so I didn't take my math classes seriously. I got straight A's ever since I switched to math, but I guess that still wasn't good enough to raise my GPA significantly.

If I try really hard in master's, though, all of these things above are amendable. Except my undergrad GPA. The undergrad GPA is something that I cannot fix no matter what I do. And I heard that schools look at your undergrad GPA more importantly than your master's GPA for some reason.