add nil protection on thumbnail images