made shutdownEngine work