Fixed variable name: pattern. Added default argument to getDialogList()