Fix to checking for successful job completion