Fix problem on log errors