bug fixes for cached image preview
removing debug output