fixing transition bug