fixed invalid logging