Fix transition bug