Fixed active window bug.