fixes the redundant logging bug