Window keeps shutting down