avoiding TrapExitSecurityException