fix open/close