Fixed Logf bug