fix transition. TODO: use attribute instead of id parsing