General compatibility fixes for opening in 3.x