Bugfix attempt

Trying to fix bug causing windows to switch focus after adding entries.