We propose modifications to the Automatic Relevance Determination (ARD) algorithm for solving the EEG/MEG inverse problem when the activation map of the cortex is known to be sparse. We propose to include a term to account for the background noise activity, i.e. electric activity of sources not in the cortex. Also, we prune the results of the ARD algorithm using a Model Selection criterion to get sparser results. Simulations with a realistic head model show a very important reduction of the number of sources incorrectly detected as active.