Fixes logging issue