Fixed crash on loading thumbnails for non-media files