fix possible window leak problem and release v1.2