Added animation when transitioning