bug with open/close