- added performance tweak
- prevented possible error when using transitions