Ran out of filament and need to restart print

I need to restart a print but it keeps trying to home z in the center of the table. I tried
G28 X Y;
G28 Z;

And that homes X and Y fine but Z still tries to home in the center of the table, where my part is. I assume there is some built in sequence that is forcing it to do that? Can I bypass this somehow?