Add better handling of clients in moduleProduction