2to3 fixes and fixed set_facts without an active window