reintroduced useGui flag so it can be overridden