Fix window close animation disappear bug
Unify variables naming