store profile (only) on close)
Merge pull request #1969 from matiu/bug/focus

store profile (only) on close)