Fixed Security context not being cleaned up after each execution.