Changed default value of leaveOpen