Fixed issue: prevent NullPointerException at openAnimate and closeAnimate methods.