fix some FindBugs warnings

Fixed some FindBugs warnings introduced by log preview image refactoring.