More robust gate animation