fixing last-window binding