Fix for animation when a view is accessed for the first time