Fixed bug with empty window being show

Added support so we don't need a default window