logging fixed too