Fix some bugs in the profiles dialog model.

1) When adding profile selection is cleared.
2) When deleting the selected profile selection is cleared.