Added some more implementation for smoother transitions.