Fixed client not initialized bug