Fix missing endfunction.