Make transitions work properly