fix problem with authentication on generate.