Bad logging fixed