corrected getDialogs