attempt to fix active window bug