added case if nothing open