fix missing function ending