fixing js error and adding thumb