Trinity not shutting down properly