Fix emergency_delay method

When emergency delay is nil (routine call), it need to be set to 0
because it is added to integer step_delay.