Fix return values
Fix missing function export