Corrected a problem with a missed reference to the current function