Add missing function to handle pair error