fix opened flag