fix opened class (thanks neoxaker)