Fix bug with showing image thumbnails