maybe fix open and close issues