fix logOrFix functions