Small bugfix for environments with window but not already defined Q
Add todo