Aberdeen boss Craig Brown admitted his side were fortunate to squeeze past Dundee with a 1-0 victory in the SPL.