Fix gallery animation