fixed (I think) the issue of the preferences window appearing, but not in focus