Improved transition handling