Clean up settings dialog
Fix a null reference exception at Task.CanRun