merge from srs 2.0.36, use build in open/close.