Fixed bug for preferences.

Only user set commands where run.
Added error message if the selected command isn't set.