FF: minor fixes to window to handle corner cases of new units and shaders code