fixed wrong logging