fixed a bug on logs