bugfix open/close