fixes secret handling