added onlyKeepOneOpen option