small changes to avoid errors when Igor set to debug on bad wave reference. No change in function.