Clean code.
Shut down rendering engine if inactive (see #10579)
Clean and fix log message.