fix api var name so save to dir works