Fix error when using back button when viewing a GIF.