fix bug in log call