Fixed freezes on trap switching.