Solved bug in animation of menu