finally fixed xbutton animation