fix code for operator reg and log