I am presuming you are using Mach 3
On the settings page you can put in a number for safe Z position and also on config > logic you can enable "use safe Z ", once done if the Z is lower it will move first. There was a bug in earlier versions where under certain circumstances the safe Z would not move when lower but it has been fixed now so make sure you have the latest version.
BTW the safe Z is in machine coordinates so your safe Z should be set on or below 0, as an example I have mine at Z -5 (mm)
Hood